.class public Lcom/permission/runtime/e$a;
.super Ljava/lang/Object;
.source "PermissionRequest.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/permission/runtime/e;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "a"
.end annotation


# instance fields
.field private a:Landroid/content/Context;

.field private b:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field

.field private c:Z

.field private d:Z


# direct methods
.method private constructor <init>(Landroid/content/Context;)V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-boolean v0, p0, Lcom/permission/runtime/e$a;->c:Z

    const/4 v0, 0x1

    .line 3
    iput-boolean v0, p0, Lcom/permission/runtime/e$a;->d:Z

    .line 4
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/permission/runtime/e$a;->b:Ljava/util/HashMap;

    .line 5
    iput-object p1, p0, Lcom/permission/runtime/e$a;->a:Landroid/content/Context;

    return-void
.end method

.method public static a(Landroid/content/Context;)Lcom/permission/runtime/e$a;
    .locals 1

    .line 1
    new-instance v0, Lcom/permission/runtime/e$a;

    invoke-direct {v0, p0}, Lcom/permission/runtime/e$a;-><init>(Landroid/content/Context;)V

    return-object v0
.end method


# virtual methods
.method public a(Ljava/lang/String;)Lcom/permission/runtime/e$a;
    .locals 1

    const/4 v0, 0x0

    .line 2
    invoke-virtual {p0, p1, v0}, Lcom/permission/runtime/e$a;->a(Ljava/lang/String;I)Lcom/permission/runtime/e$a;

    return-object p0
.end method

.method public a(Ljava/lang/String;I)Lcom/permission/runtime/e$a;
    .locals 2
    .param p2    # I
        .annotation build Landroidx/annotation/StringRes;
        .end annotation
    .end param

    .line 3
    iget-boolean v0, p0, Lcom/permission/runtime/e$a;->d:Z

    if-eqz v0, :cond_0

    .line 4
    invoke-static {p1}, Lcom/permission/runtime/f;->a(Ljava/lang/String;)Z

    move-result v0

    iput-boolean v0, p0, Lcom/permission/runtime/e$a;->c:Z

    const/4 v0, 0x0

    .line 5
    iput-boolean v0, p0, Lcom/permission/runtime/e$a;->d:Z

    .line 6
    :cond_0
    iget-boolean v0, p0, Lcom/permission/runtime/e$a;->c:Z

    invoke-static {p1}, Lcom/permission/runtime/f;->a(Ljava/lang/String;)Z

    move-result v1

    if-ne v0, v1, :cond_3

    .line 7
    iget-boolean v0, p0, Lcom/permission/runtime/e$a;->c:Z

    if-nez v0, :cond_2

    if-eqz p2, :cond_1

    goto :goto_0

    .line 8
    :cond_1
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string p2, "Dangerous permission, String resource ID #0x0"

    invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw p1

    .line 9
    :cond_2
    :goto_0
    iget-object v0, p0, Lcom/permission/runtime/e$a;->b:Ljava/util/HashMap;

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p2

    invoke-virtual {v0, p1, p2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    return-object p0

    .line 10
    :cond_3
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string p2, "Different permission types be added"

    invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public a()Lcom/permission/runtime/e;
    .locals 3

    .line 11
    iget-object v0, p0, Lcom/permission/runtime/e$a;->b:Ljava/util/HashMap;

    if-eqz v0, :cond_1

    .line 12
    iget-boolean v1, p0, Lcom/permission/runtime/e$a;->c:Z

    if-eqz v1, :cond_0

    .line 13
    new-instance v1, Lcom/permission/runtime/o;

    iget-object v2, p0, Lcom/permission/runtime/e$a;->a:Landroid/content/Context;

    invoke-direct {v1, v2, v0}, Lcom/permission/runtime/o;-><init>(Landroid/content/Context;Ljava/util/HashMap;)V

    goto :goto_0

    .line 14
    :cond_0
    new-instance v1, Lcom/permission/runtime/a;

    iget-object v2, p0, Lcom/permission/runtime/e$a;->a:Landroid/content/Context;

    invoke-direct {v1, v2, v0}, Lcom/permission/runtime/a;-><init>(Landroid/content/Context;Ljava/util/HashMap;)V

    :goto_0
    return-object v1

    .line 15
    :cond_1
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "Request Permissions is null , please call setPermissions to set."

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public a(Lcom/permission/runtime/c;)V
    .locals 1

    .line 16
    invoke-virtual {p0}, Lcom/permission/runtime/e$a;->a()Lcom/permission/runtime/e;

    move-result-object v0

    invoke-interface {v0, p1}, Lcom/permission/runtime/e;->a(Lcom/permission/runtime/c;)V

    return-void
.end method
